module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING, JSON } = Sequelize;
    await queryInterface.createTable('actives', {
      activeId: { type: INTEGER, primaryKey: true, autoIncrement: true },
      userId: { type: INTEGER, allowNull: false },
      text: { type: STRING(1000), allowNull: false },
      photos: { type: JSON, allowNull: false },
      time: { type: INTEGER, allowNull: false },
    });
  },

  down: async (queryInterface) => {
    await queryInterface.dropTable('actives');
  },
};
